<meta charset="UTF-8">
<script>
  const shapeType = {
    triangle: Symbol('triangle'),
    circle: Symbol('circle')
  }

  function getArea(shape, option) {
    switch (shape) {
      case shapeType.triangle: {
        return 0.5 * option.width * option.height
      }
      case shapeType.circle: {
        return Math.PI * option.radius * option.radius
      }
    }
  }
  console.log(getArea(shapeType.circle, { width: 10, height: 10, radius: 10 }))
</script>
